/**
 * 
 */
package fr.polichouz.geotracer.shared;

/**
 * @author Yoyo
 *
 */
public class SysOutErrLogger implements Logger {
    
    private void outPrintln(String message) {
	System.out.println(message);
    }
    
    private void outPrintln(String message, Throwable tr) {
	System.out.println(message + "cause : " + tr.getLocalizedMessage());
    }
    
    private void errPrintln(String message) {
	System.err.println(message);
    }
    
    private void errPrintln(String message, Throwable tr) {
	System.err.println(message + "cause : " + tr.getLocalizedMessage());
    }

    /**
     * @see fr.polichouz.geotracer.shared.Logger#verbose(java.lang.String)
     */
    @Override
    public void verbose(String message) {
	outPrintln(message);
    }

    /**
     * @see fr.polichouz.geotracer.shared.Logger
     * #verbose(java.lang.String, java.lang.Throwable)
     */
    @Override
    public void verbose(String message, Throwable tr) {
	outPrintln(message, tr);
    }

    /**
     * @see fr.polichouz.geotracer.shared.Logger#info(java.lang.String)
     */
    @Override
    public void info(String message) {
	outPrintln(message);
    }

    /**
     * @see fr.polichouz.geotracer.shared.Logger
     * #info(java.lang.String, java.lang.Throwable)
     */
    @Override
    public void info(String message, Throwable tr) {
	outPrintln(message, tr);
    }

    /**
     * @see fr.polichouz.geotracer.shared.Logger#debug(java.lang.String)
     */
    @Override
    public void debug(String message) {
	outPrintln(message);
    }

    /**
     * @see fr.polichouz.geotracer.shared.Logger
     * #debug(java.lang.String, java.lang.Throwable)
     */
    @Override
    public void debug(String message, Throwable tr) {
	outPrintln(message, tr);
    }

    /**
     * @see fr.polichouz.geotracer.shared.Logger#warning(java.lang.String)
     */
    @Override
    public void warning(String message) {
	outPrintln(message);
    }

    /**
     * @see fr.polichouz.geotracer.shared.Logger
     * #warning(java.lang.String, java.lang.Throwable)
     */
    @Override
    public void warning(String message, Throwable tr) {
	outPrintln(message, tr);
    }

    /**
     * @see fr.polichouz.geotracer.shared.Logger#error(java.lang.String)
     */
    @Override
    public void error(String message) {
	errPrintln(message);
    }

    /**
     * @see fr.polichouz.geotracer.shared.Logger
     * #error(java.lang.String, java.lang.Throwable)
     */
    @Override
    public void error(String message, Throwable tr) {
	errPrintln(message, tr);
    }
}
